package com.gateway.plugin.base.handler;

import com.gateway.common.dto.ApiDefinition;
import com.gateway.common.dto.sync.ApiSyncData;

/**
 * @program: api-gateway
 * @description:
 * @author: YuKai Fan
 * @create: 2025/2/5 15:20
 **/
public interface ApiDataHandler {

    /**
     * Handle apiDefinition.
     *
     * @param apiDefinition the api data
     */
    void handle(ApiDefinition apiDefinition);

    /**
     * Remove apiDefinition.
     *
     * @param apiDefinition the api data
     */
    void remove(ApiDefinition apiDefinition);

    /**
     * Refresh.
     */
    default void refresh() {
    }

    /**
     * rpc type string.
     *
     * @return the rpc type string
     * @see com.gateway.common.enums.RpcTypeEnum#getName()
     */
    String rpcType();
}
